.class public Lrexsee/core/menu/RexseeMenu;
.super Ljava/lang/Object;
.source "RexseeMenu.java"

# interfaces
.implements Lrexsee/core/browser/clazz/JavascriptInterface;


# static fields
.field public static final DEFAULT_STYLE_OPTIONSMENU:Ljava/lang/String; = "window-type:popup;window-outside-cancelable:true;window_align:center;window_vertical_align:bottom;height:200;window_dim_amount:0;border-width:2px;border-color:#222222;"

.field public static final ID_COMMON_MENU:Ljava/lang/String; = "common_menu"

.field private static final INTERFACE_NAME:Ljava/lang/String; = "Menu"


# instance fields
.field public isOptionsMenuOpen:Z

.field private final mBrowser:Lrexsee/core/browser/Browser;

.field private final mContext:Landroid/content/Context;

.field public final menus:Lrexsee/core/menu/PopMenus;

.field private optionsMenuId:Ljava/lang/String;


# direct methods
.method public constructor <init>(Lrexsee/core/browser/Browser;)V
    .locals 11
    .param p1, "browser"    # Lrexsee/core/browser/Browser;

    .prologue
    const-string v10, "common_menu"

    const-string v9, ""

    const-string v8, "label:"

    const-string v7, ";"

    .line 38
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 33
    const-string v1, ""

    iput-object v9, p0, Lrexsee/core/menu/RexseeMenu;->optionsMenuId:Ljava/lang/String;

    .line 34
    const/4 v1, 0x0

    iput-boolean v1, p0, Lrexsee/core/menu/RexseeMenu;->isOptionsMenuOpen:Z

    .line 40
    iput-object p1, p0, Lrexsee/core/menu/RexseeMenu;->mBrowser:Lrexsee/core/browser/Browser;

    .line 41
    invoke-virtual {p1}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v1

    iput-object v1, p0, Lrexsee/core/menu/RexseeMenu;->mContext:Landroid/content/Context;

    .line 42
    new-instance v1, Lrexsee/core/menu/PopMenus;

    invoke-direct {v1}, Lrexsee/core/menu/PopMenus;-><init>()V

    iput-object v1, p0, Lrexsee/core/menu/RexseeMenu;->menus:Lrexsee/core/menu/PopMenus;

    .line 44
    new-instance v0, Lrexsee/core/menu/PopMenu;

    const-string v1, "common_menu"

    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "label:"

    invoke-direct {v1, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget-object v2, Lrexsee/core/lang/RexseeLanguage;->TITLE_MENU:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ";"

    invoke-virtual {v1, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, p1, v10, v1}, Lrexsee/core/menu/PopMenu;-><init>(Lrexsee/core/browser/Browser;Ljava/lang/String;Ljava/lang/String;)V

    .line 45
    .local v0, "commonMenu":Lrexsee/core/menu/PopMenu;
    new-instance v1, Lrexsee/core/menu/PopMenuItem;

    iget-object v2, p0, Lrexsee/core/menu/RexseeMenu;->mContext:Landroid/content/Context;

    sget-object v3, Lrexsee/core/lang/RexseeLanguage;->ACTION_RELOAD:Ljava/lang/String;

    new-instance v4, Lrexsee/core/menu/RexseeMenu$1;

    invoke-direct {v4, p0}, Lrexsee/core/menu/RexseeMenu$1;-><init>(Lrexsee/core/menu/RexseeMenu;)V

    .line 50
    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "label:"

    invoke-direct {v5, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget-object v6, Lrexsee/core/lang/RexseeLanguage;->ACTION_RELOAD:Ljava/lang/String;

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, ";"

    invoke-virtual {v5, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-direct {v1, v2, v3, v4, v5}, Lrexsee/core/menu/PopMenuItem;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Runnable;Ljava/lang/String;)V

    .line 45
    invoke-virtual {v0, v1}, Lrexsee/core/menu/PopMenu;->add(Lrexsee/core/menu/PopMenuItem;)V

    .line 51
    new-instance v1, Lrexsee/core/menu/PopMenuItem;

    iget-object v2, p0, Lrexsee/core/menu/RexseeMenu;->mContext:Landroid/content/Context;

    sget-object v3, Lrexsee/core/lang/RexseeLanguage;->ACTION_BACK:Ljava/lang/String;

    new-instance v4, Lrexsee/core/menu/RexseeMenu$2;

    invoke-direct {v4, p0}, Lrexsee/core/menu/RexseeMenu$2;-><init>(Lrexsee/core/menu/RexseeMenu;)V

    .line 56
    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "label:"

    invoke-direct {v5, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget-object v6, Lrexsee/core/lang/RexseeLanguage;->ACTION_BACK:Ljava/lang/String;

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, ";"

    invoke-virtual {v5, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-direct {v1, v2, v3, v4, v5}, Lrexsee/core/menu/PopMenuItem;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Runnable;Ljava/lang/String;)V

    .line 51
    invoke-virtual {v0, v1}, Lrexsee/core/menu/PopMenu;->add(Lrexsee/core/menu/PopMenuItem;)V

    .line 57
    new-instance v1, Lrexsee/core/menu/PopMenuItem;

    iget-object v2, p0, Lrexsee/core/menu/RexseeMenu;->mContext:Landroid/content/Context;

    sget-object v3, Lrexsee/core/lang/RexseeLanguage;->ACTION_FORWARD:Ljava/lang/String;

    new-instance v4, Lrexsee/core/menu/RexseeMenu$3;

    invoke-direct {v4, p0}, Lrexsee/core/menu/RexseeMenu$3;-><init>(Lrexsee/core/menu/RexseeMenu;)V

    .line 62
    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "label:"

    invoke-direct {v5, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget-object v6, Lrexsee/core/lang/RexseeLanguage;->ACTION_FORWARD:Ljava/lang/String;

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, ";"

    invoke-virtual {v5, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-direct {v1, v2, v3, v4, v5}, Lrexsee/core/menu/PopMenuItem;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Runnable;Ljava/lang/String;)V

    .line 57
    invoke-virtual {v0, v1}, Lrexsee/core/menu/PopMenu;->add(Lrexsee/core/menu/PopMenuItem;)V

    .line 63
    new-instance v1, Lrexsee/core/menu/PopMenuItem;

    iget-object v2, p0, Lrexsee/core/menu/RexseeMenu;->mContext:Landroid/content/Context;

    sget-object v3, Lrexsee/core/lang/RexseeLanguage;->ACTION_RESTART:Ljava/lang/String;

    new-instance v4, Lrexsee/core/menu/RexseeMenu$4;

    invoke-direct {v4, p0}, Lrexsee/core/menu/RexseeMenu$4;-><init>(Lrexsee/core/menu/RexseeMenu;)V

    .line 68
    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "label:"

    invoke-direct {v5, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget-object v6, Lrexsee/core/lang/RexseeLanguage;->ACTION_RESTART:Ljava/lang/String;

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, ";"

    invoke-virtual {v5, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-direct {v1, v2, v3, v4, v5}, Lrexsee/core/menu/PopMenuItem;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Runnable;Ljava/lang/String;)V

    .line 63
    invoke-virtual {v0, v1}, Lrexsee/core/menu/PopMenu;->add(Lrexsee/core/menu/PopMenuItem;)V

    .line 69
    new-instance v1, Lrexsee/core/menu/PopMenuItem;

    iget-object v2, p0, Lrexsee/core/menu/RexseeMenu;->mContext:Landroid/content/Context;

    sget-object v3, Lrexsee/core/lang/RexseeLanguage;->ACTION_QUIT:Ljava/lang/String;

    new-instance v4, Lrexsee/core/menu/RexseeMenu$5;

    invoke-direct {v4, p0}, Lrexsee/core/menu/RexseeMenu$5;-><init>(Lrexsee/core/menu/RexseeMenu;)V

    .line 74
    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "label:"

    invoke-direct {v5, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget-object v6, Lrexsee/core/lang/RexseeLanguage;->ACTION_QUIT:Ljava/lang/String;

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, ";"

    invoke-virtual {v5, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-direct {v1, v2, v3, v4, v5}, Lrexsee/core/menu/PopMenuItem;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Runnable;Ljava/lang/String;)V

    .line 69
    invoke-virtual {v0, v1}, Lrexsee/core/menu/PopMenu;->add(Lrexsee/core/menu/PopMenuItem;)V

    .line 75
    new-instance v1, Lrexsee/core/menu/PopMenuItem;

    iget-object v2, p0, Lrexsee/core/menu/RexseeMenu;->mContext:Landroid/content/Context;

    sget-object v3, Lrexsee/core/lang/RexseeLanguage;->TITLE_ABOUT:Ljava/lang/String;

    new-instance v4, Lrexsee/core/menu/RexseeMenu$6;

    invoke-direct {v4, p0}, Lrexsee/core/menu/RexseeMenu$6;-><init>(Lrexsee/core/menu/RexseeMenu;)V

    .line 80
    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "label:"

    invoke-direct {v5, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget-object v6, Lrexsee/core/lang/RexseeLanguage;->TITLE_ABOUT:Ljava/lang/String;

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, ";"

    invoke-virtual {v5, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-direct {v1, v2, v3, v4, v5}, Lrexsee/core/menu/PopMenuItem;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Runnable;Ljava/lang/String;)V

    .line 75
    invoke-virtual {v0, v1}, Lrexsee/core/menu/PopMenu;->add(Lrexsee/core/menu/PopMenuItem;)V

    .line 81
    iget-object v1, p1, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget-object v1, v1, Lrexsee/core/application/RexseeApplication;->resources:Lrexsee/core/application/Resource;

    iget-object v1, v1, Lrexsee/core/application/Resource;->home:Ljava/lang/String;

    const-string v2, ""

    invoke-virtual {v1, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 82
    new-instance v1, Lrexsee/core/menu/PopMenuItem;

    iget-object v2, p0, Lrexsee/core/menu/RexseeMenu;->mContext:Landroid/content/Context;

    sget-object v3, Lrexsee/core/lang/RexseeLanguage;->ACTION_SETUP:Ljava/lang/String;

    new-instance v4, Lrexsee/core/menu/RexseeMenu$7;

    invoke-direct {v4, p0}, Lrexsee/core/menu/RexseeMenu$7;-><init>(Lrexsee/core/menu/RexseeMenu;)V

    .line 87
    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "label:"

    invoke-direct {v5, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget-object v6, Lrexsee/core/lang/RexseeLanguage;->ACTION_SETUP:Ljava/lang/String;

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, ";"

    invoke-virtual {v5, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-direct {v1, v2, v3, v4, v5}, Lrexsee/core/menu/PopMenuItem;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Runnable;Ljava/lang/String;)V

    .line 82
    invoke-virtual {v0, v1}, Lrexsee/core/menu/PopMenu;->add(Lrexsee/core/menu/PopMenuItem;)V

    .line 89
    :cond_0
    iget-object v1, p0, Lrexsee/core/menu/RexseeMenu;->menus:Lrexsee/core/menu/PopMenus;

    invoke-virtual {v1, v0}, Lrexsee/core/menu/PopMenus;->add(Lrexsee/core/menu/PopMenu;)V

    .line 91
    const-string v1, "common_menu"

    iput-object v10, p0, Lrexsee/core/menu/RexseeMenu;->optionsMenuId:Ljava/lang/String;

    .line 93
    return-void
.end method

.method static synthetic access$0(Lrexsee/core/menu/RexseeMenu;)Lrexsee/core/browser/Browser;
    .locals 1

    .prologue
    .line 31
    iget-object v0, p0, Lrexsee/core/menu/RexseeMenu;->mBrowser:Lrexsee/core/browser/Browser;

    return-object v0
.end method


# virtual methods
.method public addItem(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 7
    .param p1, "menuId"    # Ljava/lang/String;
    .param p2, "upUrl"    # Ljava/lang/String;
    .param p3, "style"    # Ljava/lang/String;

    .prologue
    const-string v2, ""

    .line 145
    const-string v0, ""

    const-string v0, ""

    const-string v0, ""

    move-object v0, p0

    move-object v1, p1

    move-object v3, p2

    move-object v4, p3

    move-object v5, v2

    move-object v6, v2

    invoke-virtual/range {v0 .. v6}, Lrexsee/core/menu/RexseeMenu;->addItem(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 146
    return-void
.end method

.method public addItem(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 7
    .param p1, "menuId"    # Ljava/lang/String;
    .param p2, "upUrl"    # Ljava/lang/String;
    .param p3, "normalStyle"    # Ljava/lang/String;
    .param p4, "pressedStyle"    # Ljava/lang/String;
    .param p5, "selectedStyle"    # Ljava/lang/String;

    .prologue
    .line 148
    const-string v2, ""

    move-object v0, p0

    move-object v1, p1

    move-object v3, p2

    move-object v4, p3

    move-object v5, p4

    move-object v6, p5

    invoke-virtual/range {v0 .. v6}, Lrexsee/core/menu/RexseeMenu;->addItem(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 149
    return-void
.end method

.method public addItem(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 10
    .param p1, "menuId"    # Ljava/lang/String;
    .param p2, "downUrl"    # Ljava/lang/String;
    .param p3, "upUrl"    # Ljava/lang/String;
    .param p4, "normalStyle"    # Ljava/lang/String;
    .param p5, "pressedStyle"    # Ljava/lang/String;
    .param p6, "selectedStyle"    # Ljava/lang/String;

    .prologue
    .line 151
    iget-object v1, p0, Lrexsee/core/menu/RexseeMenu;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->urlListeners:Lrexsee/core/browser/RexseeUrl;

    invoke-virtual {v1, p2}, Lrexsee/core/browser/RexseeUrl;->getAbsoluteUrl(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    .line 152
    .local v8, "down_Url":Ljava/lang/String;
    iget-object v1, p0, Lrexsee/core/menu/RexseeMenu;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->urlListeners:Lrexsee/core/browser/RexseeUrl;

    invoke-virtual {v1, p3}, Lrexsee/core/browser/RexseeUrl;->getAbsoluteUrl(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    .line 153
    .local v2, "up_Url":Ljava/lang/String;
    iget-object v1, p0, Lrexsee/core/menu/RexseeMenu;->menus:Lrexsee/core/menu/PopMenus;

    invoke-virtual {v1, p1}, Lrexsee/core/menu/PopMenus;->get(Ljava/lang/String;)Lrexsee/core/menu/PopMenu;

    move-result-object v9

    .line 154
    .local v9, "popMenu":Lrexsee/core/menu/PopMenu;
    if-eqz v9, :cond_0

    .line 155
    const-string v1, ""

    invoke-virtual {p2, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_1

    const/4 v1, 0x0

    move-object v3, v1

    .line 161
    .local v3, "downRunnable":Ljava/lang/Runnable;
    :goto_0
    const-string v1, ""

    invoke-virtual {p3, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_2

    const/4 v1, 0x0

    move-object v4, v1

    .line 167
    .local v4, "upRunnable":Ljava/lang/Runnable;
    :goto_1
    new-instance v0, Lrexsee/core/menu/PopMenuItem;

    iget-object v1, p0, Lrexsee/core/menu/RexseeMenu;->mContext:Landroid/content/Context;

    move-object v5, p4

    move-object v6, p5

    move-object/from16 v7, p6

    invoke-direct/range {v0 .. v7}, Lrexsee/core/menu/PopMenuItem;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Runnable;Ljava/lang/Runnable;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 168
    .local v0, "item":Lrexsee/core/menu/PopMenuItem;
    invoke-virtual {v9, v0}, Lrexsee/core/menu/PopMenu;->add(Lrexsee/core/menu/PopMenuItem;)V

    .line 170
    .end local v0    # "item":Lrexsee/core/menu/PopMenuItem;
    .end local v3    # "downRunnable":Ljava/lang/Runnable;
    .end local v4    # "upRunnable":Ljava/lang/Runnable;
    :cond_0
    return-void

    .line 155
    :cond_1
    new-instance v1, Lrexsee/core/menu/RexseeMenu$8;

    invoke-direct {v1, p0, v8}, Lrexsee/core/menu/RexseeMenu$8;-><init>(Lrexsee/core/menu/RexseeMenu;Ljava/lang/String;)V

    move-object v3, v1

    goto :goto_0

    .line 161
    .restart local v3    # "downRunnable":Ljava/lang/Runnable;
    :cond_2
    new-instance v1, Lrexsee/core/menu/RexseeMenu$9;

    invoke-direct {v1, p0, v2}, Lrexsee/core/menu/RexseeMenu$9;-><init>(Lrexsee/core/menu/RexseeMenu;Ljava/lang/String;)V

    move-object v4, v1

    goto :goto_1
.end method

.method public clearOptionsMenu()V
    .locals 1

    .prologue
    .line 182
    const-string v0, ""

    iput-object v0, p0, Lrexsee/core/menu/RexseeMenu;->optionsMenuId:Ljava/lang/String;

    .line 183
    return-void
.end method

.method public clickOptionsMenu(Landroid/view/MenuItem;)V
    .locals 5
    .param p1, "item"    # Landroid/view/MenuItem;

    .prologue
    const-string v4, "OptionsMenu"

    .line 106
    iget-object v2, p0, Lrexsee/core/menu/RexseeMenu;->menus:Lrexsee/core/menu/PopMenus;

    iget-object v3, p0, Lrexsee/core/menu/RexseeMenu;->optionsMenuId:Ljava/lang/String;

    invoke-virtual {v2, v3}, Lrexsee/core/menu/PopMenus;->get(Ljava/lang/String;)Lrexsee/core/menu/PopMenu;

    move-result-object v0

    .line 107
    .local v0, "popMenu":Lrexsee/core/menu/PopMenu;
    if-eqz v0, :cond_1

    .line 108
    iget-object v2, v0, Lrexsee/core/menu/PopMenu;->items:Ljava/util/ArrayList;

    invoke-interface {p1}, Landroid/view/MenuItem;->getItemId()I

    move-result v3

    invoke-virtual {v2, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lrexsee/core/menu/PopMenuItem;

    iget-object v1, v2, Lrexsee/core/menu/PopMenuItem;->upRunnable:Ljava/lang/Runnable;

    .line 109
    .local v1, "runnable":Ljava/lang/Runnable;
    if-eqz v1, :cond_0

    .line 110
    invoke-interface {v1}, Ljava/lang/Runnable;->run()V

    .line 117
    .end local v1    # "runnable":Ljava/lang/Runnable;
    :goto_0
    return-void

    .line 112
    .restart local v1    # "runnable":Ljava/lang/Runnable;
    :cond_0
    iget-object v2, p0, Lrexsee/core/menu/RexseeMenu;->mBrowser:Lrexsee/core/browser/Browser;

    const-string v3, "OptionsMenu"

    const-string v3, "OptionsMenu item runnable is null."

    invoke-virtual {v2, v4, v3}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0

    .line 115
    .end local v1    # "runnable":Ljava/lang/Runnable;
    :cond_1
    iget-object v2, p0, Lrexsee/core/menu/RexseeMenu;->mBrowser:Lrexsee/core/browser/Browser;

    const-string v3, "OptionsMenu"

    const-string v3, "OptionsMenu item is null."

    invoke-virtual {v2, v4, v3}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0
.end method

.method public closeOptionsMenu()V
    .locals 0

    .prologue
    .line 192
    iget-object p0, p0, Lrexsee/core/menu/RexseeMenu;->mContext:Landroid/content/Context;

    .end local p0    # "this":Lrexsee/core/menu/RexseeMenu;
    check-cast p0, Landroid/app/Activity;

    invoke-virtual {p0}, Landroid/app/Activity;->closeOptionsMenu()V

    .line 193
    return-void
.end method

.method public composeOptionsMenu(Landroid/view/Menu;)V
    .locals 3
    .param p1, "menu"    # Landroid/view/Menu;

    .prologue
    .line 96
    iget-object v1, p0, Lrexsee/core/menu/RexseeMenu;->menus:Lrexsee/core/menu/PopMenus;

    iget-object v2, p0, Lrexsee/core/menu/RexseeMenu;->optionsMenuId:Ljava/lang/String;

    invoke-virtual {v1, v2}, Lrexsee/core/menu/PopMenus;->get(Ljava/lang/String;)Lrexsee/core/menu/PopMenu;

    move-result-object v0

    .line 97
    .local v0, "popMenu":Lrexsee/core/menu/PopMenu;
    if-eqz v0, :cond_0

    .line 98
    invoke-virtual {v0, p1}, Lrexsee/core/menu/PopMenu;->composeOptionsMenu(Landroid/view/Menu;)V

    .line 99
    const/4 v1, 0x1

    iput-boolean v1, p0, Lrexsee/core/menu/RexseeMenu;->isOptionsMenuOpen:Z

    .line 104
    :goto_0
    return-void

    .line 101
    :cond_0
    invoke-interface {p1}, Landroid/view/Menu;->clear()V

    .line 102
    const/4 v1, 0x0

    iput-boolean v1, p0, Lrexsee/core/menu/RexseeMenu;->isOptionsMenuOpen:Z

    goto :goto_0
.end method

.method public create(Ljava/lang/String;)V
    .locals 1
    .param p1, "menuId"    # Ljava/lang/String;

    .prologue
    .line 129
    const-string v0, ""

    invoke-virtual {p0, p1, v0}, Lrexsee/core/menu/RexseeMenu;->create(Ljava/lang/String;Ljava/lang/String;)V

    .line 130
    return-void
.end method

.method public create(Ljava/lang/String;Ljava/lang/String;)V
    .locals 2
    .param p1, "menuId"    # Ljava/lang/String;
    .param p2, "style"    # Ljava/lang/String;

    .prologue
    .line 132
    iget-object v1, p0, Lrexsee/core/menu/RexseeMenu;->menus:Lrexsee/core/menu/PopMenus;

    invoke-virtual {v1, p1}, Lrexsee/core/menu/PopMenus;->get(Ljava/lang/String;)Lrexsee/core/menu/PopMenu;

    move-result-object v0

    .line 133
    .local v0, "popMenu":Lrexsee/core/menu/PopMenu;
    if-eqz v0, :cond_0

    .line 134
    iget-object v1, v0, Lrexsee/core/menu/PopMenu;->items:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->clear()V

    .line 135
    iget-object v1, v0, Lrexsee/core/menu/PopMenu;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v1, p2}, Lrexsee/core/style/StyleSheet;->parseStyle(Ljava/lang/String;)Lrexsee/core/style/StyleSheet;

    .line 140
    :goto_0
    return-void

    .line 137
    :cond_0
    new-instance v0, Lrexsee/core/menu/PopMenu;

    .end local v0    # "popMenu":Lrexsee/core/menu/PopMenu;
    iget-object v1, p0, Lrexsee/core/menu/RexseeMenu;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-direct {v0, v1, p1, p2}, Lrexsee/core/menu/PopMenu;-><init>(Lrexsee/core/browser/Browser;Ljava/lang/String;Ljava/lang/String;)V

    .line 138
    .restart local v0    # "popMenu":Lrexsee/core/menu/PopMenu;
    iget-object v1, p0, Lrexsee/core/menu/RexseeMenu;->menus:Lrexsee/core/menu/PopMenus;

    invoke-virtual {v1, v0}, Lrexsee/core/menu/PopMenus;->add(Lrexsee/core/menu/PopMenu;)V

    goto :goto_0
.end method

.method public exists(Ljava/lang/String;)Z
    .locals 2
    .param p1, "menuId"    # Ljava/lang/String;

    .prologue
    .line 125
    iget-object v1, p0, Lrexsee/core/menu/RexseeMenu;->menus:Lrexsee/core/menu/PopMenus;

    invoke-virtual {v1, p1}, Lrexsee/core/menu/PopMenus;->get(Ljava/lang/String;)Lrexsee/core/menu/PopMenu;

    move-result-object v0

    .line 126
    .local v0, "popMenu":Lrexsee/core/menu/PopMenu;
    if-nez v0, :cond_0

    const/4 v1, 0x0

    :goto_0
    return v1

    :cond_0
    const/4 v1, 0x1

    goto :goto_0
.end method

.method public getInheritInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 1
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 20
    iget-object v0, p1, Lrexsee/core/browser/Browser;->menu:Lrexsee/core/menu/RexseeMenu;

    return-object v0
.end method

.method public getInterfaceName()Ljava/lang/String;
    .locals 2

    .prologue
    .line 16
    new-instance v0, Ljava/lang/StringBuilder;

    iget-object v1, p0, Lrexsee/core/menu/RexseeMenu;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget-object v1, v1, Lrexsee/core/application/RexseeApplication;->resources:Lrexsee/core/application/Resource;

    iget-object v1, v1, Lrexsee/core/application/Resource;->prefix:Ljava/lang/String;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v1, "Menu"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getNewInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 1
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 24
    new-instance v0, Lrexsee/core/menu/RexseeMenu;

    invoke-direct {v0, p1}, Lrexsee/core/menu/RexseeMenu;-><init>(Lrexsee/core/browser/Browser;)V

    return-object v0
.end method

.method public getOptionsMenuId()Ljava/lang/String;
    .locals 1

    .prologue
    .line 185
    iget-object v0, p0, Lrexsee/core/menu/RexseeMenu;->optionsMenuId:Ljava/lang/String;

    return-object v0
.end method

.method public open(Ljava/lang/String;)V
    .locals 2
    .param p1, "menuId"    # Ljava/lang/String;

    .prologue
    .line 172
    iget-object v1, p0, Lrexsee/core/menu/RexseeMenu;->menus:Lrexsee/core/menu/PopMenus;

    invoke-virtual {v1, p1}, Lrexsee/core/menu/PopMenus;->get(Ljava/lang/String;)Lrexsee/core/menu/PopMenu;

    move-result-object v0

    .line 173
    .local v0, "menu":Lrexsee/core/menu/PopMenu;
    if-eqz v0, :cond_0

    .line 174
    iget-object v1, p0, Lrexsee/core/menu/RexseeMenu;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {v0, v1}, Lrexsee/core/menu/PopMenu;->open(Lrexsee/core/browser/Browser;)V

    .line 176
    :cond_0
    return-void
.end method

.method public open(Lrexsee/core/menu/PopMenu;)V
    .locals 1
    .param p1, "menu"    # Lrexsee/core/menu/PopMenu;

    .prologue
    .line 120
    iget-object v0, p0, Lrexsee/core/menu/RexseeMenu;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p1, v0}, Lrexsee/core/menu/PopMenu;->open(Lrexsee/core/browser/Browser;)V

    .line 121
    return-void
.end method

.method public openOptionsMenu()V
    .locals 0

    .prologue
    .line 189
    iget-object p0, p0, Lrexsee/core/menu/RexseeMenu;->mContext:Landroid/content/Context;

    .end local p0    # "this":Lrexsee/core/menu/RexseeMenu;
    check-cast p0, Landroid/app/Activity;

    invoke-virtual {p0}, Landroid/app/Activity;->openOptionsMenu()V

    .line 190
    return-void
.end method

.method public remove(Ljava/lang/String;)V
    .locals 1
    .param p1, "menuId"    # Ljava/lang/String;

    .prologue
    .line 142
    iget-object v0, p0, Lrexsee/core/menu/RexseeMenu;->menus:Lrexsee/core/menu/PopMenus;

    invoke-virtual {v0, p1}, Lrexsee/core/menu/PopMenus;->remove(Ljava/lang/String;)V

    .line 143
    return-void
.end method

.method public setOptionsMenuId(Ljava/lang/String;)V
    .locals 0
    .param p1, "menuId"    # Ljava/lang/String;

    .prologue
    .line 179
    iput-object p1, p0, Lrexsee/core/menu/RexseeMenu;->optionsMenuId:Ljava/lang/String;

    .line 180
    return-void
.end method
